import instance from "@/utils/axios.js";
import qs from 'qs'

/**
 * 管理员登录
 * @param {string} username 
 * @param {string} password 
 * @returns 
 */
const login = ({username,password}) => {

  return instance({
    method: 'POST',
    url: '/admin/login',
    data: qs.stringify({
      username,
      password
    })
  })
}

export default{
  login
}